package com.lmx.javasendmail;

public class Test {

    public static void main(String[] args) {
        String sendMail = "leungmx0206@163.com";
        String receiveMail = "2445181091@qq.com";
        MailSenderInfo senderInfo = new MailSenderInfo();
        senderInfo.setMailServerHost("smtp.163.com");
        senderInfo.setMailServerPort("");
        senderInfo.setValidate(true);
        senderInfo.setDebugMode(true);
        senderInfo.setAccount(sendMail);
        senderInfo.setPassword("HGCKFIBFYWRIPGCC");
        senderInfo.setFromAddress(sendMail);
        senderInfo.setToAddress(receiveMail);
        senderInfo.setSubject("我是标题");
        senderInfo.setContent("你是傻子");
        if (MailSendHelper.sendTextMail(senderInfo)) {
            System.out.print("发送成功！");
        } else {
            System.out.print("发送失败！");
        }
    }

}
